package top.csjss.hospital.service;

import com.github.pagehelper.PageInfo;
import top.csjss.hospital.entity.SysRole;
import top.csjss.hospital.vo.LayUIDTreeVO;

import java.util.List;

/**
 * @Author ztf
 * @Date 17:48 2021/10/18
 **/
public interface SysRoleService {
    List<SysRole> findAll();

    PageInfo<SysRole> loadAllRole(String rolename, String roledesc, Integer available, Integer page, Integer limit);

    /**
     * 获取角色菜单树
     * @param roleid
     * @return
     */
    List<LayUIDTreeVO> initRoleMenuTreeJSON(Integer roleid);

    /**
     * 保存角色菜单
     * @param roleid
     * @param ids
     */
    void saveRoleMenu(Integer roleid, Integer[] ids);

    /**
     * 删除角色
     * @param roleid
     */
    void deleteRole(Integer roleid);

    /**
     * 添加角色
     * @param rolename
     * @param roledesc
     * @param available
     */
    void insertRole(String rolename, String roledesc, Integer available);

    /**
     * 修改角色
     * @param roleid
     * @param rolename
     * @param roledesc
     * @param available
     */
    void updateRole(Integer roleid, String rolename, String roledesc, Integer available);
}
